package com.czxy.Demo28;

import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;
import java.util.List;

public class Test {
    public static void main(String[] args) throws IOException {
        List<String> list = FileUtils.readLines(new File("data28.txt"), "UTF-8");
        byte[] b = new byte[list.size()];
        for (String s : list) {
            String[] split = s.split("=");
            b[Integer.parseInt(split[0])] = (byte) Integer.parseInt(split[1]);
        }
        for (byte b1 : b) {
            System.out.println(b1);
        }
        FileUtils.writeByteArrayToFile(new File("a.jpg") , b);
    }
}